﻿using Batman.BLL.UserModule.WeixinResource;
using IdentityServer4.Validation;

namespace Microsoft.Extensions.DependencyInjection
{
    public static class IdentityServerBuilderExtensionsAdditional
    {
        /// <summary>
        /// 添加微信获取token
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static IIdentityServerBuilder AddWeixinOpenGrant(this IIdentityServerBuilder builder)
        {

            return builder.AddExtensionGrantValidator<WeiXinOpenGrantValidator>();
        }
    }
}
